package com.gonsin.i18n.logic.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Getter
@Setter
public class I18nConfig {

    private String langPath = "lang";            // lang列表存放目录
    private String encoder = "utf8";             // 默认的编码
    private String key = "nusTIdVQFhQs2lrz";                  // 解码秘钥
    private String headerLangName = "lang";                  // session里说明语言的值
    private String defaultLang = "zh-CN";                  // 解码秘钥

    private String cloudAddress = "http://update.gonsincloud.com";        // 云端存储

    private String projectName = "venus";        // 后台项目名字(与前端项目区分)

    private Long saveDelay = 10000L;           // 延迟保存，单位 毫秒


    /**
     * 默认配置
     */
    public static I18nConfig defaultConfig() {
        I18nConfig config = new I18nConfig();
        config.langPath = "lang";
        config.encoder = "utf8";
        config.key = "nusTIdVQFhQs2lrz";
        config.headerLangName = "lang";
        config.defaultLang = "zh-CN";
        return config;
    }
}
